简体   繁体   中英

Using Swift3 Package Manager with Xcode 8 with no luck

I'm trying to integrate swift package manager in my project, but with no luck. The iOS simulator crashes at startup.

Here are the steps that I followed in order to integrate the package manager:

  1. open xcode and create a new xcodeproject: testcpackage
  2. from the terminal I've run the command:
    • swift package init to create the Package.swift file
    • swift package generate-xcodeproj
    • swift build
    • swift test - everything seems to be ok
  3. open the new generated file testpackage.xcodeproj in xcode
  4. run the application (cmd+R): build succeeded
    • first error given by the iOS simulator: Could not attach to pid : “9207”
    • I close the iOS simulator and I run the project again when I get the 2nd error:
No installable items found at /Users/xxxxxx/Library/Developer/CoreSimulator/Devices/555xxx14-xxx-xx-8E6E-C13D5AB463A0/data/Library/Caches/com.apple.mobile.installd.staging/temp.rA1vGO/extracted/Payload

Could you please help me to solve this issue?

I use the following method to get packages to work in iOS. That being said, I'm not sure if this is the "best" way to do this:

  1. Make starting Package.swift file
  2. swift package generate-xcodeproj
  3. Open project in Xcode
  4. Project : Build Settings : Base SDK ==> change to IOS
  5. Editor : Add Target : (iOS ... Single View App)
  6. Select your project, look at target list, find your newly added target : General : Deployment Info
  7. On toolbar, change "active scheme" to the new target
  8. Run

It has worked for me in the past. However, I have had to fix search paths. I'm currently suffering from that problem here: Xcode: missing required module error

Good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM