2

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?

  • 1
    According to: "Depending on Apple Modules At this time there is no explicit support for depending on UIKit, AppKit, etc, though importing these modules should work if they are present in the proper system location. We will add explicit support for system dependencies in the future. Note that at this time the Package Manager has no support for iOS, watchOS, or tvOS platforms." on (https://github.com/apple/swift-package-manager/blob/master/Documentation/Reference.md#depending-on-apple-modules). Swift Package manager has no support for IOS currently. – Larry B Apr 09 '17 at 03:48

1 Answers1

0

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

Narwhal
  • 744
  • 1
  • 8
  • 22