What's the steps to build iOS App using Enterprise version?

Hi all,

I’m starting to build my APP on iOS platform by Enterprise but there is poor document to guide.

I need some help to build my project successfully.

My situation:

  1. A lua project which could be build successfully on Corona Pro version;

  2. Plugins need to be integrated: flurry, Facebook, notification.

I’ve had the *.a from Enterprise daily buildings. And I noticed there is a bundle file in Facebook resources directory.

  1. I’m using xCode 6.1.1

I want to know:

[OK, now I know them all.]

  1. Where I should put these *.a static library?

 [In the build phase page or build setting, add the *.a file and *.framework file in the link section]

  1. Where I should put the Facebook bundle file?

[In the build phase page, there is a bundle file section, click ‘+’ to add the 3rd party bundle file ]

  1. What should I config in the iOS project setting?

[see below.]

  1. How should I use the ‘metadata.lua’ in each plugin?

[seems no use in iOS build.]

  1. Is build.setting used in iOS building phase, as I know build android version in Enterprise do not need this file.

[Yes, iOS would use the file and in build phase this file would be converted into xx.plist]

  1. There is “build.sh” in project ios directory, should use this script to build APP or use xCode build tools?

[never mind, just leave it there.]

========KEY TO BUILD SUCCESSFULLY. Please do below setting==========

In the Deployment Info section below, go through and edit the options such as Deployment Target, Devices, Device Orientation, etc.

Next, scroll down to the Linked Frameworks and Libraries and, at the bottom, click on the +button. Locate AVFoundation.framework, select it, and click Add.

Now, in the uppermost bar of the middle pane, click on the Build Settings tab and scroll down to Linking. For Other Linker Flags, enter -all_load -ObjC -lobjc -lsqlite3.

Scroll down to the Apple LLVM 5.1 – Language – C++ block. In this section, change the entry for C++ Standard Library to libstdc++ (GNU C++ standard library).

Two issues need still to know the answer:

  1. I’ve build my project successfully when set deployment target to 6.1, 

But when I set  deployment target to 8.1, get about 31 errors:

such as:

 

Undefined symbols for architecture i386:

  “std::string::find(char const*, unsigned long, unsigned long) const”, referenced from:

      Rtt::ShaderName::ShaderName(char const*) in libplayer.a(Rtt_ShaderName.o)

  “std::string::compare(char const*) const”, referenced from:

      Rtt::ShaderFactory::LoadDependency(Rtt::LuaMap*, std::string, std::map<std::string, Rtt::SharedPtr<Rtt::Shader>, std::less<std::string>, std::allocator<std::pair<std::string const, Rtt::SharedPtr<Rtt::Shader> > > >&, bool) in libplayer.a(Rtt_ShaderFactory.o)

      Rtt::ShaderInput::UpdateCache(Rtt::TextureInfo const&, Rtt::RenderData const&) in libplayer.a(Rtt_ShaderInput.o)

  “std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const”, referenced from:

      Rtt::LuaMap::LuaMap(lua_State*, int) in libplayer.a(Rtt_LuaContainer.o)

  “std::istream& std::istream::_M_extract<long>(long&)”, referenced from:

      Rtt::CKWorkflow::Init(lua_State*) in libplayer.a(Rtt_CKWorkflow.o)

  “std::ostream& std::ostream::_M_insert<double>(double)”, referenced from:

      Rtt::LuaMap::LuaMap(lua_State*, int) in libplayer.a(Rtt_LuaContainer.o)

  “std::string::_M_leak_hard()”, referenced from:

      Rtt::CKWorkflow::CreateAlertSettingsFor(Rtt::CKWorkflow::CheckResult, std::string const&) in libplayer.a(Rtt_CKWorkflow.o)

  “std::string::_Rep::_M_destroy(std::allocator<char> const&)”, referenced from:

 

  1. When I got the build file, I find the App is bigger than the one built by the corona pro version. Almost _8M bigger, what _happened?

Have you read this tutorial?  http://coronalabs.com/blog/2014/03/18/tutorial-corona-enterprise-quickstart-ios/

Rob

Hi Rob,

just like mlhdyx I’m having issues with enterprise as well. I went through that tutorial but that only show us how to make a custom plugin. But what about if we want to use one of the given plugins like iads, admob etc. There is not really any documentation on how to do any of that in enterprise. So far all I got from reading forums posts is that we have to drag those plugins into the xcode project but then what? It seems like we have to link them some how and it seems like we need to add the frameworks in xcode as well. Could you or anyone help us out here? I feel like now that corona sdk is free a lot of people are going to be using enterprise since it’s the only one we have to pay for but the documentation for enterprise it’s very little and some of us are stuck. 

Yep, I fixed it by the setting follow.  I skipped them too when I skipped the custom plugin part of the tutorial.

In the Deployment Info section below, go through and edit the options such as Deployment Target, Devices, Device Orientation, etc.

Next, scroll down to the Linked Frameworks and Libraries and, at the bottom, click on the +button. Locate AVFoundation.framework, select it, and click Add.

Now, in the uppermost bar of the middle pane, click on the Build Settings tab and scroll down to Linking. For Other Linker Flags, enter -all_load -ObjC -lobjc -lsqlite3.

Scroll down to the Apple LLVM 5.1 – Language – C++ block. In this section, change the entry for C++ Standard Library to libstdc++ (GNU C++ standard library).

 

@Rob, I think we need another tutorial to describe how to use the existing plugin libraries.

 

The current tutorial confuses most of Pro users that lots of paragraph describe how to create a custom plugin but actually as an enterprise beginning user we do not need to do that.

Actually I’m planning on an Enterprise tutorial for this Tuesday that specifically covers how to get an existing SDK project running as an Enterprise project.  It may span into two because Android and iOS are radically different.  I’m not sure if making one combined makes sense or two separate ones.

Rob

Great to hear that, @Rob.

The left issue for me is:

Why the size of the APP is bigger than the one built by the PRO version? 

Almost 5M bigger. What’s I still missed?

 

I’ve noticed that libfacebook.a is almost 26.4M, and there is a extract.sh file in the plugin directory which contains script below:

lipo libfacebook.a -remove x86_64 -output libfacebook.a

lipo libfacebook.a -remove i386 -output libfacebook.a

Is that the reason? How should I use extract.sh?

I’m not sure why you would want to do this.  It will remove the facebook library parts that are needed.  If you don’t need facebook don’t include it.  But you will need both the i386 and x86_64 variants to submit your app.

Rob

I need the Facebook.  I’m just looking for the reason why my APP built by Enterprise is bigger than the Pro one.

The APP built by Enterprise is almost 41M , but it’s only 35M built by Pro.

I can see contents of the APP, the unix executable file is bigger then before, why and what should I do?

It’s only 5 mb, which isn’t that much.  Are you measuring a release build vs. a release build?  Debug builds will naturally be bigger.  There could be some additional frameworks that Enterprise is including that SDK is not.

Two issues need still to know the answer:

  1. I’ve build my project successfully when set deployment target to 6.1, 

But when I set  deployment target to 8.1, get about 31 errors:

such as:

 

Undefined symbols for architecture i386:

  “std::string::find(char const*, unsigned long, unsigned long) const”, referenced from:

      Rtt::ShaderName::ShaderName(char const*) in libplayer.a(Rtt_ShaderName.o)

  “std::string::compare(char const*) const”, referenced from:

      Rtt::ShaderFactory::LoadDependency(Rtt::LuaMap*, std::string, std::map<std::string, Rtt::SharedPtr<Rtt::Shader>, std::less<std::string>, std::allocator<std::pair<std::string const, Rtt::SharedPtr<Rtt::Shader> > > >&, bool) in libplayer.a(Rtt_ShaderFactory.o)

      Rtt::ShaderInput::UpdateCache(Rtt::TextureInfo const&, Rtt::RenderData const&) in libplayer.a(Rtt_ShaderInput.o)

  “std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const”, referenced from:

      Rtt::LuaMap::LuaMap(lua_State*, int) in libplayer.a(Rtt_LuaContainer.o)

  “std::istream& std::istream::_M_extract<long>(long&)”, referenced from:

      Rtt::CKWorkflow::Init(lua_State*) in libplayer.a(Rtt_CKWorkflow.o)

  “std::ostream& std::ostream::_M_insert<double>(double)”, referenced from:

      Rtt::LuaMap::LuaMap(lua_State*, int) in libplayer.a(Rtt_LuaContainer.o)

  “std::string::_M_leak_hard()”, referenced from:

      Rtt::CKWorkflow::CreateAlertSettingsFor(Rtt::CKWorkflow::CheckResult, std::string const&) in libplayer.a(Rtt_CKWorkflow.o)

  “std::string::_Rep::_M_destroy(std::allocator<char> const&)”, referenced from:

 

  1. When I got the build file, I find the App is bigger than the one built by the corona pro version. Almost _8M bigger, what _happened?

Have you read this tutorial?  http://coronalabs.com/blog/2014/03/18/tutorial-corona-enterprise-quickstart-ios/

Rob

Hi Rob,

just like mlhdyx I’m having issues with enterprise as well. I went through that tutorial but that only show us how to make a custom plugin. But what about if we want to use one of the given plugins like iads, admob etc. There is not really any documentation on how to do any of that in enterprise. So far all I got from reading forums posts is that we have to drag those plugins into the xcode project but then what? It seems like we have to link them some how and it seems like we need to add the frameworks in xcode as well. Could you or anyone help us out here? I feel like now that corona sdk is free a lot of people are going to be using enterprise since it’s the only one we have to pay for but the documentation for enterprise it’s very little and some of us are stuck. 

Yep, I fixed it by the setting follow.  I skipped them too when I skipped the custom plugin part of the tutorial.

In the Deployment Info section below, go through and edit the options such as Deployment Target, Devices, Device Orientation, etc.

Next, scroll down to the Linked Frameworks and Libraries and, at the bottom, click on the +button. Locate AVFoundation.framework, select it, and click Add.

Now, in the uppermost bar of the middle pane, click on the Build Settings tab and scroll down to Linking. For Other Linker Flags, enter -all_load -ObjC -lobjc -lsqlite3.

Scroll down to the Apple LLVM 5.1 – Language – C++ block. In this section, change the entry for C++ Standard Library to libstdc++ (GNU C++ standard library).

 

@Rob, I think we need another tutorial to describe how to use the existing plugin libraries.

 

The current tutorial confuses most of Pro users that lots of paragraph describe how to create a custom plugin but actually as an enterprise beginning user we do not need to do that.

Actually I’m planning on an Enterprise tutorial for this Tuesday that specifically covers how to get an existing SDK project running as an Enterprise project.  It may span into two because Android and iOS are radically different.  I’m not sure if making one combined makes sense or two separate ones.

Rob

Great to hear that, @Rob.

The left issue for me is:

Why the size of the APP is bigger than the one built by the PRO version? 

Almost 5M bigger. What’s I still missed?

 

I’ve noticed that libfacebook.a is almost 26.4M, and there is a extract.sh file in the plugin directory which contains script below:

lipo libfacebook.a -remove x86_64 -output libfacebook.a

lipo libfacebook.a -remove i386 -output libfacebook.a

Is that the reason? How should I use extract.sh?

I’m not sure why you would want to do this.  It will remove the facebook library parts that are needed.  If you don’t need facebook don’t include it.  But you will need both the i386 and x86_64 variants to submit your app.

Rob

I need the Facebook.  I’m just looking for the reason why my APP built by Enterprise is bigger than the Pro one.

The APP built by Enterprise is almost 41M , but it’s only 35M built by Pro.

I can see contents of the APP, the unix executable file is bigger then before, why and what should I do?

It’s only 5 mb, which isn’t that much.  Are you measuring a release build vs. a release build?  Debug builds will naturally be bigger.  There could be some additional frameworks that Enterprise is including that SDK is not.