This guide outlines how to configure CoronaCards for usage with an existing
If you're creating a new README
.
In order for any CoronaCards project to work, you must put a valid license.ccdata
file near main.lua
, otherwise you'll get a black screen and corresponding error message in the console.
First, link your app to the C++ library. The easiest way is to rename your main.m
file to main.mm
within the Supporting Files branch of the Xcode project tree.
Include the CoronaCards framework in your project's frameworks by dragging /Users/Shared/CoronaLabs/ios/CoronaCards.framework
to the Frameworks group in your Xcode project.
In addition, CoronaCards depends on several other frameworks. These can be added from the General properties view. In this viewport, scroll down to Linked Frameworks and Libraries, then press the + button to link the frameworks listed below. Note that CoronaCards.framework
is already on the list because you copied it to your Frameworks group.
Framework | |
---|---|
AdSupport.framework (may be skipped if your app doesn't use ads) |
|
AudioToolbox.framework |
|
AVFoundation.framework |
|
CFNetwork.framework |
|
CoreGraphics.framework |
|
CoreLocation.framework |
|
CoreMedia.framework |
|
CoreMotion.framework |
|
CoreVideo.framework |
|
Foundation.framework |
|
GameController.framework (with status optional ) |
|
GLKit.framework |
|
ImageIO.framework |
|
MediaPlayer.framework |
|
MobileCoreServices.framework |
|
OpenAL.framework |
|
OpenGLES.framework |
|
QuartzCore.framework |
|
Security.framework |
|
SystemConfiguration.framework |
|
UIKit.framework |
Also, link the following libraries in the same way:
Library | |
---|---|
libsqlite3 |
|
libobjc |
|
libstdc++.6 |
Section | Setting | Value |
---|---|---|
Search Paths | Framework Search Paths | /Users/Shared/CoronaLabs/ios/ |
Build Options | Enable Bitcode | No |
Deployment | iOS Deployment Target | iOS 8.0 or higher |
Linking | Other Linker Flags | -ObjC |
Corona
folder in your project via the Finder and place your assets within it. Then, configure a Run Script Build Phase to copy the assets upon building the project:/bin/sh
, enter these two lines of code:echo "Copying Corona assets" ditto -V $PROJECT_DIR/Corona "$TARGET_BUILD_DIR"/"$EXECUTABLE_FOLDER_PATH"