Hi there,

 

I'm trying to install the library using carthage.

 

This is the content of the cartfile:

github "urbanairship/ios-library"

 

But when I run "carthage update" I get this:

*** Fetching ios-library

*** Checking out ios-library at "8.4.2"

*** xcodebuild output can be found in /var/folders/75/gpw0bhmj2g1fx4wxnfzw8bsw0000gn/T/carthage-xcodebuild.YFVKBH.log

*** Building scheme "AirshipAppExtensions" in Airship.xcworkspace

And when I go to MyProject/Carthage/Build/iOS

The only things I see is the AirshipAppExtensions.framework.

There's nothing else generated.

Am I missing something here?

 

 

Didn't find what you were looking for?

New post

Comments

27 comments

  • I verified it builds AirshipAppExtensions, AirshipKit, and AirshipKit for tvOS. Make sure your carthage is updated to 0.24.

    $ carthage version
    0.24.0

    $ carthage update
    *** Fetching ios-library
    *** Checking out ios-library at "8.4.3"
    *** xcodebuild output can be found in /var/folders/x2/fnxgwdsx4g1fn6y85ldyx215m9tqnz/T/carthage-xcodebuild.0ctSfR.log
    *** Building scheme "AirshipKit" in Airship.xcworkspace
    *** Building scheme "AirshipKit tvOS" in Airship.xcworkspace
    *** Building scheme "AirshipAppExtensions" in Airship.xcworkspace

    Comment actions Permalink
    1
  • Hey Ryan,

    Thanks a lot! That solved the issue :)

    Comment actions Permalink
    0
  •  

    Now I'm seeing different issues after importing the library like is indicated here

     

    https://docs.urbanairship.com/platform/ios/#sdk-installation

    Comment actions Permalink
    0
  • Hi Lucas,

    Can you show us the steps you took to link the SDK to your project? And, if possible, a screenshot of the full Xcode error.

    Comment actions Permalink
    0
  • Ok I solve those issues, manually installing it.

     

    I've successfully submitted the app, although the app never finishes being processed because I'm getting this errors (I got an email):

     

    Unexpected CFBundleExecutable Key - The bundle at '/Payload/xxxxx.app/AirshipKit/AirshipKit/Info.plist' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.

    Unexpected CFBundleExecutable Key - The bundle at '/Payload/xxxxx.app/AirshipKit/AirshipKitTests/Info.plist' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.

    How can I fix this?

    The version of UA that I'm using is 8.3.3

     

    Left two images here, as reference



    Comment actions Permalink
    0
  • Lucas,

    That error usually occurs during the manual SDK integration portion. 

    Depending what options you choose when importing the SDK into your project, it may include those bundles in the project, which you don't want to do.

    When including the SDK into your app, did you happen to choose Create Groups, or Create Folder References from Xcode?

    Comment actions Permalink
    0
  • I choose create folder reference.

    I was having several issues without doing that.

    Let me detail my steps here:

    1) Drag the AirshipKit folder into the project.

    2) Choose the following options: 

    - Copy items if needed

    - Create folder references

    - Target: MyApp (just that I don't have a test app)

    3) Went to the just moved AirshipKit folder within the XCode project and drag out the "AirshipKit.xcodeproj" and kept it at the top, you can see the final structure on the images on my previous comment.

     

    What's my mistake here?

    If I don't do the "Create folder references" step it won't work. I had several issues.

    Comment actions Permalink
    0
  • Lucas,

    Your project should look very similar to the Sample app (included in the library download).

    When dragging AirshipKit into your project, you should be creating Groups, not Folder References (indicated by the blue folders instead of the yellow folders).

    Additionally, are you performing these steps via Finder, or via Xcode? You should only need to copy the AirshipKit folder to your project via your Finder window, not within Xcode. From there, you'll need to drag AirshipKit.xcodeproj from your Finder window into Xcode.

    Comment actions Permalink
    0
  • Ok, I think I finally made it importing the files.

    Although I'm getting new issues, check these image, you can see the issues and also my project and file structure.



    And I've imported the library AirshipKit.framework and put it on "Embedded Binaries" and "Linked Frameworks and Libraries".

    The pointing path is /Users/xxxxx/Library/Developer/XCode/DerivedData/MyApp-gqedvcccdeiubvafmoclqbjdqaxp/Build/Products/Debug-iphoneos

    Comment actions Permalink
    0
  • Lucas,

    Try changing your Build Scheme to "AirshipKit" and running the Build command, then try changing back to your app's scheme and building the project.

    Also, while not strictly necessary, you may wish to let Xcode update the project to recommended settings for that warning that shows up.

    Comment actions Permalink
    0
  • Ok, I updated the project to recommended settings.

    Did Product > Scheme > AirshipKit

    Did Product > Clean

    Did Product > Build

    Three warnings appeared:

    Did Product > Scheme > MyAppName

    Did Product > Clean

    Did Product > Build

    These two errors appeared:

    I've highlight something that I think is weird. The lib AirshipLib doesn't have .h at its end. I've try adding it but it get automatically removed when I press build. Could that be the reason of this issue?

    Comment actions Permalink
    0
  • Lucas,

    The AirshipLib.h should not have AirshipLib in that file (If you check the public repo for AirshipKit, you should see that that is not included in that file.)

    You should be able to remove that line (import AirshipLib) from that file and re-build.

    Comment actions Permalink
    0
  • Ok, I replaced that file with the one in the repository and everything successfully built. I can't explain how that happened. All the files were new, got them from the latest package from your site :/

    Now when I submit the app to the store I get the following errors (this is like a never end story) :(

    =================================================================================

    ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'MyApp.app/Frameworks/AirshipKit.framework/AirshipResources.bundle/AirshipResources' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."
    ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'MyApp.app/Frameworks/AirshipKit.framework/AirshipResources.bundle/AirshipResources' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

    Comment actions Permalink
    0
  • Lucas,

    What does your Build Phases look like for your project? Specifically, I'm looking for the "Copy Bundle Resources" section.

    Comment actions Permalink
    0
  • I checked that...

    Here is how it looks

    Comment actions Permalink
    0
  • Anything? I think this is an issue with your library.

    Comment actions Permalink
    0
  • Lucas,

    Can you check if you have this Run Script phase in your Build Phases?

    Comment actions Permalink
    0
  • Ok after a lot of trial and error and researching around I was able to build the library. Although I'm still having an issue.

    I think the build is adding an extra file that shouldn't be there: AirshipResources.bundle. That's why 

    Before submission:
    Error after validation/submission:

    File structure located in /Users/MyUserName/Documents/xcode/MyAppName/libUAirship/Carthage/Build/iOS/AirshipKit.framework/

    Could this extra file be the issue?

    Comment actions Permalink
    0
  • Lucas,

    AirshipResources.bundle is actually required as part of the SDK. It contains resources and assets that are necessary for the SDK to function.

    However, because of how the app is being built, it is being included in your project, which generally happens if the way the SDK is integrated is done improperly. Simply removing that bundle is not going to fix the issue.

    I think, in order to prevent a lot of back-and-forth, it would be easier if you can provide a zip of your project so that we can take a look at how everything is set up, and we can provide a solution from there.

    Comment actions Permalink
    0
  •  

    I can't share the project. Just tell me where do I've to take a look, or what information do you need.

    Comment actions Permalink
    0
  • This is my setup.



    There in frameworks you can see the two .framework files, those are references to 

    MyApp/libUAirship/Carthage/Build/iOS/AirshipAppExtensions.framework
    MyApp/libUAirship/Carthage/Build/iOS/AirshipKit.framework



    Comment actions Permalink
    0
  • Lucas,

    Having a good understanding of what you have in your Build Phases, and General sections of your Xcode project would be a good place to start.

    What we want to make sure is that none of those phases are copying the frameworks into the app if they're not supposed to.

    Essentially, your project settings should look exactly like what our Sample Project shows.

    Comment actions Permalink
    0
  • Lucas,

    I don't see AirshipKit.xcodeproj in your project directory? Did you remove that?

    Comment actions Permalink
    0
  • That's not on the Carthage instructions in your site. 

    https://docs.urbanairship.com/platform/ios/#carthage

    Comment actions Permalink
    0
  • Lucas,

    You had it in your project in your previous screenshots...

    Regardless of whether or not you're using Carthage, AirshipKit.xcodeproj should be in your project directory.

    Comment actions Permalink
    0
  • I did that. And I even replicate completely the sample app and got even more issues. Many related to the architecture.

    I can't believe how many difficulties I'm having with this. There are so many libraries around and this one is the only one that's giving me headaches.

     

    Comment actions Permalink
    0
  • Here's the solution

    https://github.com/urbanairship/ios-library/issues/144

    Was an issue on the UA library.

    Comment actions Permalink
    0

Please sign in to leave a comment.