Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Xcode error

I am getting an error when I export to Xcode and then try to build.
To confirm I am not doing anything wrong I did the following:

  1. Started with a blank single view Swift iOS program. I can build and even "Archive" no problem, so nothing wrong even with my certificates.
  2. Take blank Codea project and export. Bring it up on Mac in Xcode. Build and I get an error:

note: building against lib version 2.3.2.
note: Downloading Codea Library...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 248 100 248 0 0 1431 0 --:--:-- --:--:-- --:--:-- 1433
gunzip: /Users/patrickcoxall/Downloads/BlankProject/Libs/libcodea.a.gz: not in gzip format
note: Downloading Tools Library...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 248 100 248 0 0 1343 0 --:--:-- --:--:-- --:--:-- 1347
gunzip: /Users/patrickcoxall/Downloads/BlankProject/Libs/libtools.a.gz: not in gzip format
Command /bin/sh failed with exit code 1

Not sure what I could be doing wrong?
Am I missing a setting I need to change before even building?

Thanks, Patrick

Tagged:

Comments

  • SimeonSimeon Admin Mod
    Posts: 4,893

    It looks like the script is failing to download the correct library files.

    It should be getting these files from the net:

    https://codea.io/lib/libtools-2.3.2.a.gz
    https://codea.io/lib/libcodea-2.3.2.a.gz

  • I have solved that problem by using the lib files from an old project.
    The next problem as mentioned in another thread is that none of the images show up in the app running on the simulator or on a device.

    Any suggestions?
    I have 1 app ready to goto the App Store and another 6 on the way.
    Thanks

  • @MrCoxall Try exporting again from the iPad, I never got that problem and I did the same thing you did, by taking the libs from my old projects. Another solution (which is quite tedious) is to save all your assets to a file in dropbox and put the file into your project.

  • @MrCoxall And also, I know this is quite off-topic, but I would just like to thank you for your YouTube videos, although they are extremely basic, it got me to understand programming, and now it has been a year, and I am making shaders and 3D games (no intent of bragging btw). I just really wanted to thank you

  • Wondering if you could send me your Xcode project?
    I tried exporting again and placing an image in Dropbox and I still get nothing.
    I even added the image in the Xcode assets and still nothing.
    Looking for any solution.

    Thanks for the comment about the videos.
    I actually just did it for my students, never thought other people would watch them.
    They are a little out of date. Maybe I will get to updating them some time.

    Thanks, Patrick

  • @MrCoxall the only thing I can tell for resolving the problem is to make sure you have internet connection. Also, the xcassets is for app icon and launch screen, doesn't have anything to do with the actual in-app assets. And lastly, manually export your assets. When you're exporting it from Codea, the last option is to choose your packs. Don't let it do it automatically, that will send the correct assets. I advise that you do it manually. That's all I can think of. Best of luck!

  • I tried it again and still no luck.
    I am at a total loose on what I am doing wrong.
    Never had this issue before.

    Created a new project with just 1 Planet Cute person.
    In Codea it works fine.
    Export the project, with manually selecting the Planet Cute assets.
    Open in Xcode.
    Perform the "recommended" fixes.
    Remove the iAd and GameCenter compile Sources under Build Phases.
    Run in iPad Air 2 simulator and no image shows up.

    Here is a link to my Xcode project, if you can see anything that I am doing wrong. Thanks

    https://drive.google.com/open?id=0BxJplyUFPhf-cG5BY1I4SzBtT1E

  • @MrCoxall I ran the program and it didn't work for me, I don't know where the error is coming from, but it has to be... to be honest, I have no idea what the problem is. I've only worked with it for 10 minutes, I'll work with it more, and if I get it, I'll make sure I let you know, sorry.

  • Thanks for trying.
    At least I know it is. J me.
    I thugs I was loosing my mind.

  • @CamelCoder Did you mention that you actually got images showing up recently? If that is true, would you be able to post the Xcode project somewhere? I could then try placing my assets and Lua files in it and see if it works.

    Thanks again.

  • @MrCoxall I thought I had images loading, turns out I had just exported it before this glitch. I currently exported a project and it keeps giving me a signal SIGABRT error because the assets aren't working properly. (Took me a while, but I figured out that that was the cause). I'm going to try looking at old projects and seeing the difference. I replaced the frameworks and bundles, but nothing changed.

  • SimeonSimeon Admin Mod
    Posts: 4,893

    @MrCoxall I managed to get your project working (red background, Character Boy sprite in the center).

    It looks like the files you had in the Libs/ folder were out of date — use the ones I linked above in my first reply, replacing libcodea.a and libtools.a.

    Also the files RuntimeResources.bundle and ToolsResources.bundle are out of date in your Libs/ folder. Newer versions of these should be exported correctly from the latest version of Codea and you should be able to replace the ones in your project with these. If not, they are attached here for convenience.

    Note that if you need to make insecure http requests, then also set the App Transport Security settings in your exported project's Info.plist as shown in the attached image. This will be handled better in a future Codea update.

  • Thanks again for your help.
    It is in the App Store waiting for review.

    Replacing all the files in the lib directory with the ones provided in this thread worked.

    Unfortunately, Apple sent me back the following warning:

    Dear developer,

    We have discovered one or more issues with your recent delivery for "The Wanderer". To process your delivery, the following issues must be corrected:

    Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

    Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

    Once these issues have been corrected, you can then redeliver the corrected binary.

    Regards,

    The App Store team

    So I had to add in a reason to give access to the Camera and the Photo library, even though the app itself does not use either. I assume this is because Codes could use them, even if my app is not. It would be nice to have the option to turn these off, so you do not need to ask for something you are not going to use.

    Thanks again for all your help.
    Patrick

  • @MrCoxall I received that same error, and I know how to counter. Go tot the folder of your project in finder, and find the info.plist (not the one in TheWanderer.codea) and add 2 things:
    Private - Photo Library Usage Description
    and
    Private - Camera Usage Description
    The values are both going to be strings.
    Double tap on where it says (string), and it should be a description. For example, the first one could be, Used to load photos from the library, and the second one could be, Used to use camera images. They make you do these even tho you may not use the camera in the application, so don't worry, it doesn't really do anything. Hope it helped!

  • I am having another problem with the export to Xcode.
    When I comment out the line of code to enable Game Center in AppDelegate.mm:
    //Uncomment the following line if you'd like to use the basic GameCenter addon:
    [self.viewController registerAddon:[GameCenterAddon sharedInstance]];

    I get the following errors:

    Showing Recent Issues
    "OBJC_CLASS$_GameCenterAddon", referenced from:
    objc-class-ref in AppDelegate.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Anyone have a fix?
    Thanks

  • Here is a GitHub repo of an example app that I am having the Game Center issue with:
    https://github.com/Mr-Coxall/Time-Travel

  • @MrCoxall are u sure that u have the GameCenterAddon.h and GameCenterAddon.m files in your project? They may be missing.

Sign In or Register to comment.