Skip to content

Commit

Permalink
(iOS) Added config to start. Provided source.
Browse files Browse the repository at this point in the history
  • Loading branch information
agramonte committed Jun 16, 2023
1 parent bb4a7ed commit c680f09
Show file tree
Hide file tree
Showing 22 changed files with 1,559 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ For iOS and to your plist:
```
3. Init plugin.
```
local bugsnag = require( "plugin.bugsnag")
bugsnag.init( <Listerner> ) -- Nothing gets returnd by listerner at this time, but please provide.
local bugsnag = require( "plugin.bugsnag")
bugsnag.init( <Listerner> ) -- Nothing gets returnd by listerner at this time, but please provide.
```
Optionally you can provide id, name and e-mail:
```
bugsnag.init (<Listerner>, {id = "<userId of user>",email = "<email of user>", name="playerName" }) -- Please provide all three even if one or 2 or empty space.
```
4. Send breadcrumb (optional)
```
Expand Down
Binary file modified plugins/2021.3660/iphone/libplugin_bugsnag.a
Binary file not shown.
42 changes: 42 additions & 0 deletions source/ios/App-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>NSMainNibFile~ipad</key>
<string>MainWindow-iPad</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackTranslucent</string>
</dict>
</plist>
670 changes: 670 additions & 0 deletions source/ios/App.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
14 changes: 14 additions & 0 deletions source/ios/AppCoronaDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// AppCoronaDelegate.h
// TemplateApp
//
// Copyright (c) 2017 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <CoronaDelegate.h>

@interface AppCoronaDelegate : NSObject< CoronaDelegate >

@end
66 changes: 66 additions & 0 deletions source/ios/AppCoronaDelegate.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
//
// AppCoronaDelegate.mm
// TemplateApp
//
// Copyright (c) 2017 __MyCompanyName__. All rights reserved.
//

#import "AppCoronaDelegate.h"

#import <CoronaRuntime.h>
#import <CoronaLua.h>

@implementation AppCoronaDelegate

- (void)willLoadMain:(id<CoronaRuntime>)runtime
{
}

- (void)didLoadMain:(id<CoronaRuntime>)runtime
{
}

#pragma mark UIApplicationDelegate methods

// The following are stubs for common delegate methods. Uncomment and implement
// the ones you wish to be called. Or add additional delegate methods that
// you wish to be called.

/*
- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
*/

/*
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
*/

/*
- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
*/

/*
- (void)applicationDidBecomeActive:(UIApplication *)application
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
*/

/*
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
*/

@end
9 changes: 9 additions & 0 deletions source/ios/CoronaApp.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file is generated by Corona.
// All changes is overwritten when Download Plugins target is built

// import Corona native location and basic settings
#include "CoronaNative.xcconfig"

// To use Metal rather than 'classic' change -lplayer to -lplayer-angle
// And make sure to drag Native/Corona/ios/lib/MetalANGLE.framework into App's framework list
OTHER_LDFLAGS = $(inherited) $(CORONA_CUSTOM_LDFLAGS) -all_load -lplayer
15 changes: 15 additions & 0 deletions source/ios/CoronaNative.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This file contains basic setup for Corona Native apps and plugins

CORONA_ROOT=$HOME/Library/Application Support/Corona/Native

HEADER_SEARCH_PATHS = $(inherited) "$(CORONA_ROOT)/Corona/shared/include/Corona" "$(CORONA_ROOT)/Corona/shared/include/lua" "$(CORONA_ROOT)/Corona/ios/include/Corona"

LIBRARY_SEARCH_PATHS = $(inherited) "$(CORONA_ROOT)/Corona/ios/lib"

FRAMEWORK_SEARCH_PATHS = $(inherited) "$(CORONA_ROOT)/Corona/ios/lib" "$(PROJECT_DIR)/EmbeddedFrameworks"

ENABLE_BITCODE = no

// Sometimes passing -all_load flag is not an option. In this case, manually load all libraries with -force_load:
//CORONA_FORCE_LOAD = --force-load
//CORONA_CUSTOM_LDFLAGS = -force_load "$(BUILT_PRODUCTS_DIR)/libplugin_library.a"
2 changes: 2 additions & 0 deletions source/ios/EmbeddedFrameworks/Readme.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

put embedded frameworks for a plugin here
13 changes: 13 additions & 0 deletions source/ios/Plugin/PluginBugsnag.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


#ifndef _PluginBugsnag_H__
#define _PluginBugsnag_H__

#include <CoronaLua.h>
#include <CoronaMacros.h>

// This corresponds to the name of the library, e.g. [Lua] require "plugin.library"
// where the '.' is replaced with '_'
CORONA_EXPORT int luaopen_plugin_bugsnag( lua_State *L );

#endif // _PluginBugsnag_H__
Loading

0 comments on commit c680f09

Please sign in to comment.