Skip to content

Commit

Permalink
iOS test #1
Browse files Browse the repository at this point in the history
  • Loading branch information
septag committed Jun 3, 2018
1 parent 9246e77 commit e089f01
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions source/termite/ios_window.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <AVFoundation/AVFoundation.h>
#include "tmath.h"
#include <mach/mach_host.h>
#include <SDL_uikitappdelegate.h>

void* iosCreateNativeLayer(void* wnd)
{
Expand Down Expand Up @@ -35,3 +36,17 @@ uint8_t iosGetCoreCount()
{
return [[NSProcessInfo processInfo] processorCount];
}

@implementation SDLUIKitDelegate(MyMethods)
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler
{
if (userActivity.activityType == NSUserActivityTypeBrowsingWeb) {
NSURL* url = userActivity.webpageURL;
NSString* s = [url absoluteString];
const char* curl = [s UTF8String];
puts(curl);
}
return TRUE;
}
@end

0 comments on commit e089f01

Please sign in to comment.