Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

From The Blog: Featured tool: Corona Plugin for Xcode
Started by CoronaBot May 11 2017 11:34 AM

39 replies to this topic
[TOPIC CONTROLS]
Page 2 of 2 1 2
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

Falcon777

[GLOBAL: userInfoPane.html]
Falcon777
  • Contributor

  • 344 posts
  • Corona SDK

How do I import an existing Corona project to Xcode? I tried the behaviour script "Import Corona Project" but it has no response.

 

I am using Xcode version 8.3.3



[TOPIC: post.html]
#27

Falcon777

[GLOBAL: userInfoPane.html]
Falcon777
  • Contributor

  • 344 posts
  • Corona SDK

I believe a file browser/picker is supposed to popup but apparently not happening.  Kindly advise.



[TOPIC: post.html]
#28

Falcon777

[GLOBAL: userInfoPane.html]
Falcon777
  • Contributor

  • 344 posts
  • Corona SDK

Finally managed to resolve the issue by adding a daily build to the Application folder.  My default Corona SDK has no -xxxx append to the file.  Seems like that cannot be recognised.

 

The auto completion is pretty bad compared to what I am getting from LuaGlider.  Somehow it is unable to recognise the tables that I defined within my codes.  Also after typing "." after the class/library name, the entire list of Corona functions are displayed instead those specifically just for that class name.

 

E.g composer. will give the entire list of functions/constants that Corona has instead of just those specifically to composer.  :(



[TOPIC: post.html]
#29

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 493 posts
  • Enterprise

@Falcon777

 

Finally managed to resolve the issue by adding a daily build to the Application folder.  My default Corona SDK has no -xxxx append to the file.  Seems like that cannot be recognised.

 

There are a couple of simple prerequisites. Please read the guide before using the plugin. It is very short and explains everything: http://www.shakebrowser.net/corona-for-xcode/guide.html

 

The auto completion is pretty bad compared to what I am getting from LuaGlider.  Somehow it is unable to recognise the tables that I defined within my codes.

 

The auto completion works like the one in Corona Editor not the one in Lua Glider. Auto completion for user defined tables are not supported.

 

 

Also after typing "." after the class/library name, the entire list of Corona functions are displayed instead those specifically just for that class name.

E.g composer. will give the entire list of functions/constants that Corona has instead of just those specifically to composer.   :(

 

Thanks for reporting. I see... this is a bug that needs to be fixed.

 

For now you can type either composer (without the dot) to get the full list of composer functions or or composer dot some letter(s) to get the composer function suggestions matching what you typed.



[TOPIC: post.html]
#30

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 493 posts
  • Enterprise

Regarding this issue:

 

...  after typing "." after the class/library name, the entire list of Corona functions are displayed instead those specifically just for that class name.

 

E.g composer. will give the entire list of functions/constants that Corona has instead of just those specifically to composer.   :(

 

 

This appears to be some bug introduced in late Xcode 8 versions. I tested with the Xcode 9 beta and Apple seems to have fixed it. So please wait for Xcode 9 or install the beta version.



[TOPIC: post.html]
#31

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 493 posts
  • Enterprise

The Corona Plugin for Xcode has been updated to v.1.5

 

The update contains: 

 

1. A Corona Debugger.

2. The Daily Build picker was updated to work with Corona-xxxx folders.

3. Various minor improvements and fixes.

 

Get it here: https://marketplace.coronalabs.com/asset/corona-plugin-for-xcode

 

Please notice: this plugin will not update automatically like other plugins in the marketplace. You will have to manually download the update and install it over the previous version. To get notified about updates please follow this thread.



[TOPIC: post.html]
#32

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 493 posts
  • Enterprise

The Corona Plugin for Xcode has been updated to v.1.6
 
The update contains: 
 
1. API completion/highlighting updated to Corona 2017.3154.
2. Migrated iOS templates to use Images.xcassets icon format.
3. Updated for Xcode 9.

Get it here: https://marketplace.coronalabs.com/asset/corona-plugin-for-xcode
 
Please notice: this plugin will not update automatically like other plugins in the marketplace. You will have to manually download the update and install it over the previous version. To get notified about updates please follow this thread.

[TOPIC: post.html]
#33

graham07

[GLOBAL: userInfoPane.html]
graham07
  • Contributor

  • 229 posts
  • Corona SDK

I noticed an issue around block comments. 

Per lua.org...

A comment starts anywhere with a double hyphen (--) and runs until the end of the line. Lua also offers block comments, which start with --[[ and run until the corresponding ]].

 
The Xcode editor only seems to recognize the closure if there is a -- in front of it (--]]) While I do it that way, a lot of people don't, so while it runs fine, it all loses its colouring.
 
The screen shots attached show the same code, one in Sublime, one in Xcode.
 
Thought I'd mention it.

Attached Files

  • Attached File  img1.png   141.82KB   0 downloads
  • Attached File  img2.png   194.1KB   0 downloads


[TOPIC: post.html]
#34

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 493 posts
  • Enterprise

Thanks Graham

 

You are right. I will change it in the next plugin update.

 

I always use --]] though... because then it is very easy to toggle the comment on/off by adding/removing an extra double hyphen at the beginning of the block comment.



[TOPIC: post.html]
#35

graham07

[GLOBAL: userInfoPane.html]
graham07
  • Contributor

  • 229 posts
  • Corona SDK

On the above, I use it too, but others don't and its makes the code hard to read :)

 

On this latest version I seem to come up with the same issue repeatedly. I import a new project, usually some code I find online I want to test, and I load it up, add the files and run it. All is good.

 

I then come back to it later, load up the project, and none of the files are there any more. It's happened on multiple projects now.

Is it me?

 

I have just updated to High Sierra, and updated Xcode to Version 9.0 (9A235)

I did uninstall and reinstall the plug in (latest from marketplace)



[TOPIC: post.html]
#36

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 493 posts
  • Enterprise

Hi Graham

I am able to recreate the problem.

 

Something was changed in the way files are imported to a project in Xcode 9.

For some reason the files are added outside of the project now. I will fix it in the next update.

 

For now: after importing everything - if you simply drag the imported folder (or files) onto the project icon (in the file view) the files will be added to the project and will be there the next time you open it. 

 

Thanks, Jacob



[TOPIC: post.html]
#37

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 493 posts
  • Enterprise

FYI:

 

I recommend updating to Xcode 9.1 when using the Corona Plugin for Xcode.

 

Xcode 9.0 had a bug that - in some cases - forced annoying (swift style) indentation on lua code.

Apple has fixed that in v.9.1.

 

Remember to disable "Automatically indent based on syntax" under Xcode > Preferences > Text Editing > Indentation

if you see strange indentation behavior.



[TOPIC: post.html]
#38

graham07

[GLOBAL: userInfoPane.html]
graham07
  • Contributor

  • 229 posts
  • Corona SDK



Thanks Graham

 

You are right. I will change it in the next plugin update.

 

I always use --]] though... because then it is very easy to toggle the comment on/off by adding/removing an extra double hyphen at the beginning of the block comment.

 

Any updates on this fix? Working on code with 8000 lines with numerous comments that don't close with --]], only ]] makes 8000 lines of code one colour... Not too handy :(.     Close to bailing and going to Sublime, and I'd rather not.

 

PS: Search and replacing ]] for --]] was disastrous since there were multiple tables like [[I]] - which fell over miserably :)



[TOPIC: post.html]
#39

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 493 posts
  • Enterprise

Hi Graham

 

Sorry I didn't get to it yet... but here is a quick fix:

Run this command in the terminal:

sed -i -e 's/--]]/]]/g' /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/Corona.xclangspec

After running the command you need to restart Xcode.

 

Thanks.



[TOPIC: post.html]
#40

graham07

[GLOBAL: userInfoPane.html]
graham07
  • Contributor

  • 229 posts
  • Corona SDK

Ahh... bliss... that'll do for now :).  Thanks




[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]